#ifndef _MARIOMAP_
#define _MARIOMAP_
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include "Object.h"
#include "Mario.h"
#include "Node.h"
#include "QuadTree.h"


using namespace std;

class MarioMap
{
private:

	int width_map;
	int height_map;
	std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems);
	std::vector<std::string> split(const std::string &s, char delim);
	std::map<int, Node*> _mapQuadTree;
public:
	list<Object*> _listObject;
	MarioMap();
	void LoadMapFromFile(std::string fileName);
	void LoadObjectFromFile(std::string fileName);
	void Deserialize(QuadTree *root);
	void Build(Node *n);
	int GetWidth() { return width_map; }
	int GetHeight() { return height_map; }
};

#endif 